package com.hainatong.shiphelper.module.handlejob.adapter;

import com.hainatong.shiphelper.databinding.ItemVoygaeInfoViewBinding;
import com.hainatong.shiphelper.module.handlejob.entity.VoyageBean;
import org.jetbrains.annotations.NotNull;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder;
import com.hainatong.shiphelper.R;

public class VoyageAdapter extends BaseQuickAdapter<VoyageBean, BaseDataBindingHolder<ItemVoygaeInfoViewBinding>>
{
    public VoyageAdapter()
    {
        super(R.layout.item_voygae_info_view);
    }

    @Override
    protected void convert(@NotNull BaseDataBindingHolder<ItemVoygaeInfoViewBinding> bindingHolder, VoyageBean voyageBean)
    {
        ItemVoygaeInfoViewBinding binding = bindingHolder.getDataBinding();
        if( binding != null )
        {
            binding.setVoygae( voyageBean );
            binding.executePendingBindings();
        }
    }
}
